package com.shizhan.javebean;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class TimeUse {

    //获取当前时间
    public String getTime(boolean trigger) {
        String timeString = null;
        while (trigger) {
            LocalDateTime localDateTime = LocalDateTime.now();
            DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
            timeString = dateTimeFormatter.format(localDateTime);
            break;
        }
        return timeString;
    }

    public void LogInTime(boolean trigger) {

        while(trigger){

        }
    }
}
